#ifndef _BUTTON_H_
#define _BUTTON_H_

#include <widget.h>

#include <string>
#include <map>
using namespace std;

namespace lgb_gtk
{

  enum ButtonStyle
  {
    BUTTON_NORMAL = 0,
    BUTTON_IMAGE
  };

  enum ButtonStat
  {
    BUTTON_STAT_NORMAL = 0,
    BUTTON_STAT_MOUSE_OVER,
    BUTTON_STAT_MOUSE_DOWN
  };

  class Button : public Widget
  {
    
    map<int (*)(void *) , void*> mouseOverFunctions;
    map<int (*)(void *) , void*> mouseDownFunctions;
    map<int (*)(void *) , void*> mouseOutFunctions;
    
  protected:
    ButtonStyle style;
    ButtonStat stat;

    int MouseOverBaseFunction();
    int MouseDownBaseFunction();
    int MouseOutBaseFunction();

  public:
    virtual int SetLabel(string newLabel) = 0;
    virtual int SetImages(string bg, string ig , string cg) = 0;
    int AddMouseOverFunction(int (*f)(void *data), void *data);
    int AddMouseDownFunction(int (*f)(void *data), void *data);
    int AddMouseOutFunction(int (*f)(void *data), void *data);
    string Type(){ return "Button"; }
  };

}

#endif
